/**
 * Created by zhaott on 2017/11/14.
 */
/** todo:链式流（压缩）
 **/
var fs=require('fs');
var zlib=require('zlib');
fs.createReadStream('out.txt').pipe(
    zlib.createGzip()
).pipe(
    fs.createWriteStream('out.txt.gz')
);